/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.iec.edp.caf.tenancy.api.service;


import io.iec.edp.caf.tenancy.api.entity.AppInstanceInfo;
import io.iec.edp.caf.tenancy.api.entity.DbConnectionInfo;

import java.util.List;

public interface TenantAppInstanceService {

    /**
     * 根据租户标识获取租户信息（不含相关的附属信息）
     *
     * @param
     * @return
     * @Date: 2019/8/22
     */
    public AppInstanceInfo get(int tenantId, String appInstanceCode);

    /**
     * 根据租户编号获取所有的租户实例基本信息(只获取实例基本信息)
     *
     * @param
     * @return
     * @Date: 2019/8/22
     */
    public List<AppInstanceInfo> getAllAppInstInfos(int tenantId);

    /**
     * 新增租户应用实例
     *
     * @param
     * @return
     * @Date: 2019/8/22
     */
    public void add(AppInstanceInfo appInstanceInfo);

    /**
     * 更新租户应用实例
     *
     * @param
     * @return
     * @Date: 2019/8/22
     */
    public boolean update(AppInstanceInfo appInstanceInfo);


    /**
     * 根据租户标识删除租户信息
     *
     * @param
     * @return
     * @Date: 2019/8/22
     */
    public boolean remove(int tenantId, String appInstanceCode);

    DbConnectionInfo getDBConnInfoTrans(int tenantId, String appInstanceCode, String su,boolean isTrans);


}
